package cardCollections;

import static org.junit.Assert.*;

import java.io.IOException;
import java.util.ArrayList;

import javax.swing.JOptionPane;

import org.junit.Test;

import cardCollections.Shoe;
import cards.Card;

public class ShoeTests {

	@Test
	public void testDealCardDoesNotDealDuplicates() {
		try {
			ArrayList<Card> list = new ArrayList<Card>();
			Shoe shoe = new Shoe();
			shoe.restoreDeck();
			shoe.shuffle();
			for (int j = 0; j < ((52 * 6) - 1); j++) {
				Card c = shoe.dealCard();
				if (list.contains(c)) {
					fail(c.toString() + " shouldn't be there already");
				}
				list.add(c);
			}

		} catch (IOException e) {
			e.printStackTrace();
		}

	}

}
